//引入相关的文件和代码包
const mongoose = require('../common/db')
//数据库的数据集
const Goods = new mongoose.Schema({
	cover : String,
    name: String,
    description: String,
    createdTime: Number,
	updatedTime: Number,
    price: Number,
	goodsTypeId : {type: mongoose.Schema.Types.ObjectId, ref:'goodsType'}
})

const goods = mongoose.model('goods', Goods)

module.exports = goods